#include <stdio.h>

int main() {
    float fee, dist, discount, price, weight;

    printf("Distance Price Weight:");
    scanf("%f %f %f", &dist, &price, &weight);
    if (dist >= 3000) {
        discount = 0.15;
    } else if (dist >= 2000) {
        discount = 0.10;
    } else if (dist >= 1000) {
        discount = 0.08;
    } else if (dist >= 500) {
        discount = 0.05;
    } else if (dist >= 250) {
        discount = 0.02;
    } else if (dist > 0) {
        discount = 0;
    } else {
        printf("Bad Distance!\n");
        return 0;
    }
    fee = price * weight * dist * (1 - discount);
    printf("Fee: %f\n", fee);

    return 0;
}
